New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Test for Safari WebKit Force Touch Events #1613
Conversation
Tests failed. Automated cross-browser testing via Sauce Labs and Travis CI shows that the JavaScript changes in this pull request are: BUSTED Commit: 116035a (Please note that this is a fully automated comment.) |
Tests passed. Automated cross-browser testing via Sauce Labs and Travis CI shows that the JavaScript changes in this pull request are: CONFIRMED Commit: 4cd0df2 (Please note that this is a fully automated comment.) |
See #1606 |
Modernizr.addTest('forcetouch', function() { | ||
|
||
// Test if the browser supports the force touch event progression (see notes link) | ||
if (!hasEvent('webkitmouseforcewillbegin', window) && |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should probably generate these event names via Modernizr.prefixed
so in the case they become unprefixed.
@ryanseddon thanks for looking into that. I'll be adding a revision over this with |
Updated to use |
@KraigWalker looks like you have committed with git's markers in it still. Wanna clean it up and squash it down to a single commit? |
ping @KraigWalker |
+1 #cantbelieveijustleftthiswhatwasithinking sorry! 😓 |
sorry, where you going to be able to update? cheers! |
Hey, Patrick. Most likely tonight. Going to dedicate some time to fix my broken PR (it seems to exist across two branches, which really isn't nice) Sent from my iPhone
|
sounds great!
let me know if I can help at all
|
1618417
to
d2153d3
Compare
That's it sorted now. |
return true; | ||
} else { | ||
return false; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this should just be return MouseEvent.WEBKIT_FORCE_AT_MOUSE_DOWN && MouseEvent.WEBKIT_FORCE_AT_FORCE_MOUSE_DOWN
sorry, couple more nits then we will be all good and merged |
No problem. Thanks for reviewing it.
|
Adds a feature detect for mouse force related events, and whether force values can be read from the MouseEvent object.
d2153d3
to
93ceb13
Compare
Add Test for Safari WebKit Force Touch Events
cheers! |
Will test if the currently defined flow of
webkitmouseforce
events from Apple is supported by the browser, and if the browser provides theWEBKIT_FORCE_AT_MOUSE_DOWN
andWEBKIT_FORCE_AT_FORCE_MOUSE_DOWN
constants on theMouseEvent
object.https://developer.apple.com/library/prerelease/mac/documentation/AppleApplications/Conceptual/SafariJSProgTopics/Articles/RespondingtoForceTouchEventsfromJavaScript.html#//apple_ref/doc/uid/TP40016162-SW1